<template>
  <nm-form-dialog ref="form" v-bind="form" v-on="on" :visible.sync="visible_">
    <el-row>
      <el-col :span="20" :offset="1">
        <el-form-item label="等级名称：" prop="rankName">
          <el-input v-model="form.model.rankName" clearable />
        </el-form-item>
        <el-form-item label="开始积分：" prop="startScore">
          <el-input v-model="form.model.startScore" clearable />
        </el-form-item>
        <el-form-item label="结束积分：" prop="endScore">
          <el-input v-model="form.model.endScore" clearable />
        </el-form-item>
        <el-form-item label="等级图标：" prop="userRankImg">
          <el-input v-model="form.model.userRankImg" clearable />
        </el-form-item>
      </el-col>
    </el-row>
  </nm-form-dialog>
</template>
<script>
import { mixins } from 'nbmodular-ui'

const { add, edit, update } = $api.member.userRanks

export default {
  mixins: [mixins.formSave],
  data() {
    return {
      title: '用户等级表',
      actions: { add, edit, update },
      form: {
        model: {
          /** 等级名称 */
          rankName: '',
          /** 开始积分 */
          startScore: '',
          /** 结束积分 */
          endScore: '',
          /** 等级图标 */
          userRankImg: ''
        },
        rules: {}
      }
    }
  }
}
</script>
